# Maintainer: Johannes Löthberg <johannes@kyriasis.com>
# Maintainer: Alexander Epaneshnikov <alex19ep@archlinux.org>
# Contributor: Ivan Shapovalov <intelfx@intelfx.name>

pkgname=python-frozendict
pkgver=2.3.4
pkgrel=2
epoch=1
pkgdesc='An immutable dictionary'
url='https://pypi.python.org/pypi/frozendict/'
arch=('any')
license=('LGPL3')
depends=('python')
makedepends=('python-setuptools')
checkdepends=('python-pytest')
source=("https://pypi.org/packages/source/f/frozendict/frozendict-$pkgver.tar.gz")
sha512sums=('a73aabcb7449f8c1876c7acbf58e41016dd8177c08321cd66082e0fec08f53cdd3d21ed3034fbadad2c188267c4adfdbcd1b761dfbc0641b2d3710b9ddad29bc')
b2sums=('d8f275c5ef7a07afeeee7ecdb36ded3955fc1801275faaa00cd8cd8a9b54cac4caefbc3d0485fe0c339de4da3afe50aa71175ed71dc0116ce0293d679fd8ec2c')

prepare() {
	cd frozendict-$pkgver
	# remove unneeded tests
	pushd test
	rm -v c_only.py test_frozendict_c.py test_frozendict_c_subclass.py
	popd
}

build() {
	cd frozendict-$pkgver
	python setup.py py build
}

check(){
	cd frozendict-$pkgver
	PYTHONPATH="$PWD/build/lib" pytest
}

package() {
	cd frozendict-$pkgver
	python setup.py py install --root="$pkgdir" --optimize=1 --skip-build
}

# vim: set ts=4 sw=4 tw=0 ft=PKGBUILD :
